import { Request, RequestForExportFile, SupplierRequest } from '@/plugins/supplier-request'
import { SUPERVISION_REGULAR_PRICE_PATH, SUPERVISION_REGULAR_PRICE_EXPORT_PATH } from './../constans'

// 供应商管理 - 监察核查 - 正常价格核查 - 列表分页查询接口
export const queryRegularPriceBillListService = (data) => {
  return Request(`${SUPERVISION_REGULAR_PRICE_PATH}/record-page`, 'post', data)
}

// 供应商管理 - 监察核查 - 正常价格核查 - 导出
export const exportRegularPriceBillListService = (data) => {
  return RequestForExportFile(`${SUPERVISION_REGULAR_PRICE_EXPORT_PATH}/record-export`, 'get', data)
}

// 供应商管理 - 监察核查 - 正常价格核查 - 获取详情
export const getRegularPriceItem = (data) => {
  return Request(`${SUPERVISION_REGULAR_PRICE_PATH}/item`, 'get', data)
}

// 供应商管理 - 监察核查 - 正常价格核查 - 关联商品分页查询接口
export const queryRegularRelationProductListService = (data) => {
  return Request(`${SUPERVISION_REGULAR_PRICE_PATH}/relation-product-page`, 'post', data)
}

// 供应商管理 - 监察核查 - 正常价格核查 - 获取详情待核查供应商
export const queryRegularPriceDetailForSupplier = (data, loadingFn) => {
  return SupplierRequest({
    url: '/supplier/supervision/pushDownPriceCheck',
    type: 'post',
    data,
    loadingFn
  })
}
